<?php

    // TITLE:
    // FILE:
    // AUTHOR:
    // DATE:
    $options = $poll->getOptions();
?>
<h3>Poll</h3>
<input type="hidden" name="id" value="<?php echo $poll->getId(); ?>">
<input name="title" type="text" value="<?php echo $poll->getTitle(); ?>">
<?php
    foreach ($options as $option) {
        echo '<input type="text" name="option[]" id="' . $option->getId() . '" value="' . $option->getTitle() . '"><br>' . "\n";
    }
    
    echo '<a href="index.php?dir=' . $dir . '&sub=subEvent&action=view$id=' . $subEvent->getId() . '">' . $subEvent->getTitle() . '</a><br>' . "\n";
    echo '<a href="index.php?dir=' . $dir . '&sub=location&action=view$id=' . $location->getId() . '">' . $location->getTitle() . '</a><br>' . "\n";
   
    echo '<h4>Guest List</h4>';
    foreach ($guestlist as $guestList) {
        $id = $guestList->getId();
        $title = $guestList->getTitle();
        $selected = ($id == $guestListId) ? ' selected' : null;
        echo '<input type="radio" name="guestList" value="' . $id . '"' . $selected . '> ' . $title . '<br>' . "\n";
    }
    //echo '<a href="index.php?dir=' . $dir . '&sub=guestList&action=view$id=' . $subEvent->getId() . '">' . $subEvent->getTitle(). '</a><br>';
?>